package com.pentofab.payrollmanagement.exception;

/**
 * Represents a generic database exception. It will be easy to handle common
 * database exceptions across the application.
 * 
 * @author AjayP
 * 
 */
public class DatabaseException extends Exception {

	private static final long serialVersionUID = 1L;

	public static final int UNKNOWN_ERROR = 0;
	public static final int DUPLICATE_ENTRY = 1;
	public static final int NO_ENTRY_FOUND = 2;
	private int code = 0;

	public DatabaseException(int code) {
		this.setCode(code);
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

}
